@import "./tag";
@import "./iconfont";
@import "./class.scss";
@font-face {
  font-family: "play";
  src: url(../font/PlayRegular.woff.ttf);
}

// 文字选中颜色
::selection {
  background: $color-theme;
  color: $color-white;
}

// 滚动条颜色
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  background: #e4e4e4;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: $color-theme;
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
}

html,
body {
  &.h-f-100 {
    height: 100%;
    overflow: hidden;
  }
}

body {
  overflow-x: hidden;
  width: 100%;
  background-color: $color-main-background;
  font: $font-size-base "play", PingFangSC-Regular,Microsoft Yahei;
  line-height: $line-height;
  color: $color-main-text;
}

// 表情
.wp-smiley {
  width: 20px !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  box-shadow: none !important;
}

.menu-mask {
  position: fixed;
  top: 60px;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: $color-mask;

  &.is-show-menu {
    z-index: $z-index;
    opacity: 1;
  }
}

// 侧边栏
.sidebar-list {
  margin-top: $container-margin;
  padding: 10px;
  border-radius: $border-radius;
  background: $color-white;

  &:first-of-type {
    margin-top: 0;
  }

  .header {
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid $color-border;

    p {
      position: relative;
      display: inline-block;

      .iconfont {
        font-size: $font-size-large;
      }

      &:after {
        content: "";
        position: absolute;
        bottom: -6px;
        left: 0;
        width: 100%;
        height: 2px;
        background: $color-theme;
      }
    }
  }

  // 评论列表
  &.comment {
    .list {
      display: flex;
      padding: 8px 0;
      border-bottom: 1px dashed $color-main-background;

      &:last-of-type {
        border: 0;
      }

      &:hover {
        .thumbnail {
          transform: rotate(666turn);
          transition-delay: 1s;
          transition-property: all;
          transition-duration: 59s;
          transition-timing-function: cubic-bezier(.34, 0, .84, 1);
        }
      }
    }

    .right {
      width: 200px;
    }

    .thumbnail {
      margin-right: 10px;
      border-radius: 50%;
    }

    .thumbnail-text {
      width: 50px;
      height: 50px;
      margin-right: 10px;
      border-radius: $border-radius;
      font-size: 28px;
      text-align: center;
      line-height: 50px;
      text-transform: uppercase;
      color: #fff;
    }

    .author {
      height: 20px;
      color: $color-theme;
    }

    .comment-text {
      max-height: 34px;
      margin: 3px 0;
      font-size: $font-size-small;
      @include ellipsisMultiline(2, $line-height, $font-size-small);
    }

    .title {
      @include ellipsisMultiline(2);
      color: $color-theme;
    }
  }

  // 站点统计
  &.count {
    .content {
      display: flex;
      flex-wrap: wrap;
    }

    .list {
      margin-top: 10px;

      &:nth-of-type(odd) {
        width: 38%;
      }

      &:nth-of-type(even) {
        width: 60%;
      }
    }
  }

  // 标签云
  &.tag-cloud {
    .header {
      display: flex;
      justify-content: space-between;
    }

    .content {
      display: flex;
      flex-wrap: wrap;
    }

    .list {
      margin: 10px 5px 0 0;
      padding: 3px 6px;
      border-radius: $border-radius;

      a {
        color: $color-white;
      }

      &.color-1 {
        background: #f3a683;
      }

      &.color-2 {
        background: #778beb;
      }

      &.color-3 {
        background: #e77f67;
      }

      &.color-4 {
        background: #f5cd79;
      }

      &.color-5 {
        background: #0fb9b1;
      }

      &.color-6 {
        background: #f8a5c2;
      }

      &.color-7 {
        background: #596275;
      }

      &.color-8 {
        background: #20bf6b;
      }
    }
  }
}

// element-ui
.el-radio__inner {
  width: 14px;
  height: 14px;
}

.el-input.is-active .el-input__inner,
.el-input__inner:focus {
  border-color: $color-theme !important;
}

// 翻页按钮
.main {
  transition: .5s;
  &.is-show-menu {
    transform: translateX(-240px);
  }
  .el-pagination {
    margin: 30px 0;
    text-align: center;

    li {
      border: 0;

      &:last-child {
        border: 0;
      }

      &.active,
      &:hover {
        background: none;
        color: $color-theme;
      }
    }

    .btn-next,
    .btn-prev {
      border: 0;
    }
  }
}

// 文章列表
.article-list-wrap {
  margin-top: $container-margin;
  padding: $container-padding;
  border-radius: $border-radius;
  background: $color-white;

  .header {
    padding-bottom: $container-padding;
    border-bottom: 1px solid $color-main-background;
    font-size: $font-size-large;
  }
}

.article-list {
  position: relative;
  display: flex;
  justify-content: space-between;
  height: 145px;
  padding: 20px 0;
  border-bottom: 1px solid $color-main-background;

  &:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0px;
    height: 1px;
    background: $color-theme;
    transition: .4s;
  }

  &:hover {
    .thumbnail {
      transform: scale(1.1);
    }

    &:after {
      width: 100%;
    }
  }

  .thumbnail-wrap {
    overflow: hidden;
  }

  // 缩略图
  .thumbnail {
    width: 260px;
    height: 145px;
    border-radius: $border-radius;
    transition: 0.5s;
  }

  // 列表内容
  .list-content {
    flex: 1;
    position: relative;
    margin-left: 15px;
  }

  // 标题
  .title {
    margin-bottom: 10px;
    font-size: 18px;
    @extend %ellipsis;

    a {
      color: #333;

      &:hover {
        color: $color-theme;
      }
    }

    .classify {
      position: relative;
      margin-right: 10px;
      padding: 3px 5px;
      background-color: $color-theme;
      border-radius: 3px;
      font-size: $font-size-small;
      color: #fff;

      &:after {
        content: "";
        position: absolute;
        right: -10px;
        top: 50%;
        border: {
          width: 5px;
          style: solid;
          color: transparent transparent transparent $color-theme;
        }
        transform: translateY(-50%);
      }
    }
  }

  .summary {
    @include ellipsisMultiline(3, 1.8);
    line-height: 1.8;
  }

  // 文章信息
  .opeartion {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: 10px;
    font-size: $font-size-small;
    color: $color-golden;
  }

  .information {
    span {
      margin-right: 10px;
    }

    .iconfont {
      margin-right: 2px;
    }
  }

  .details-btn {
    padding: 5px 10px;
    background: $color-theme;
    border-radius: $border-radius;
    color: $color-white;
  }
}

// 鼠标点击特效
.move-dot-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 25px;
  height: 25px;
  animation: move-dot .8s linear forwards;
}

@keyframes move-dot {
  to {
    opacity: 0;
    transform: translate3d(0, -80px, 0);
  }
}

@media screen and (max-width: 1200px) {
  .desktop-show {
    display: none;
  }

  .tablet-show {
    display: block;
  }

  .wrap {
    width: 94%;
  }

  // 文章列表
  .article-list-wrap,
  .container {
    .thumbnail-wrap {
      width: 260px;
      margin-right: 15px;
    }
  }
}

@media screen and (max-width:768px) {
  .phone-show {
    display: block;
  }

  .phone-hide {
    display: none;
  }

  .wrap {
    width: 90%;
  }

  .article-list {
    .list-content {
      width: 100%;
      margin: 0;
    }
  }
}
